package com.wx.chapter8.homework05;

/**
 * ClassName:Scientist
 * Package :com.wx.chapter8.homework05
 * Description :
 *
 * @Author : coder_mu
 * @Create : 2023/5/29 - 16:25
 */
public class Scientist extends Employee{
    private double bonus;//奖金属性

    @Override
    public void printSal() {
        System.out.println("科学家");
        System.out.println(getName() + " 年工资是: " + (getSal() * getSalMonth() + bonus));
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }

    public Scientist(String name, double sal, int salMonth, double bonus) {
        super(name, sal, salMonth);
        this.bonus = bonus;
    }

    public Scientist(String name, double sal, int salMonth) {
        super(name, sal, salMonth);
    }
}
